package com.prs.crm.dao.crm.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Property;

import com.prs.crm.dao.crm.CustomerContractDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.crm.CustomerContract;
import com.prs.crm.domain.crm.CustomerSupplier;
import com.prs.crm.domain.crm.DocumenTary;

public class CustomerContractDaoImpl extends BaseDaoImpl<CustomerContract> implements CustomerContractDao{

	@Override
	public List<CustomerContract> getContractBySupplier(
			CustomerSupplier customerSupplier) {
		Criteria criteria = this.getSession().createCriteria(CustomerContract.class);
		criteria.add(Property.forName("customerSupplier").eq(customerSupplier));
		return criteria.list();
	}

}
